home *** CD-ROM | disk | FTP | other *** search
- Path: in-news.erinet.com!usenet
- From: timb@erinet.com (Tim Berens)
- Newsgroups: comp.lang.c
- Subject: Re: malloc question
- Date: Sat, 16 Mar 1996 02:51:35 GMT
- Organization: EriNet Online 513 436-9915
- Message-ID: <4ict59$q3m@eri2.erinet.com>
- References: <4htonk$350@news.hklink.net> <danpop.826488975@rscernix> <4i44vk$g16@rigel.rz.uni-ulm.de>
- NNTP-Posting-Host: edlp106.erinet.com
- X-Newsreader: Forte Free Agent 1.0.82
-
- peinel@faw.uni-ulm.de (Gertraud Peinel) wrote:
-
-
-
- >Hmmm, and what should I do with this (especially when I have to use these
- >compilers) ? :
-
- > sun5:/users/peinel/clang(36)> uname -a
- > SunOS sun5 4.1.3 3 sun4c
- > sun5:/users/peinel/clang(35)> cat oh.c
- > #include <stdlib.h>
-
- > typedef struct item {
- > int val;
- > struct item *next;
- > } ITEM, *PITEM;
-
- > main()
- > {
- > PITEM head, current;
- > head= malloc(sizeof(ITEM));
- > head->val=1;
- > }
- > sun5:/users/peinel/clang(29)> cc oh.c
- > "oh.c", line 11: warning: illegal pointer combination
- > sun5:/users/peinel/clang(34)> which cc
- > /bin/cc
- > sun5:/users/peinel/clang(32)> CC oh.c
- > CC mist.c:
- > "oh.c", line 11: error: no standard conversion of char * to struct item *
- > "oh.c", line 10: warning: current not used
- > 1 error
- > sun5:/users/peinel/clang(33)> which CC
- > /com/owc++/bin/CC
-
- >Without casting ?
-
- >`gp'
-
- gp:
-
- How dare you introduce commercial reality into a discussion of
- software development? Don't you know that all you have to do is tell
- each of your supervisors all the way up the line to forget corporate
- policy and change compilers? If it's your customers who insist you
- work with these substandard (even barbaric!) compilers, tell them to
- kiss your butt. Just go get some new customers who will let you use
- the compiler of your choice.
-
- Or you could just shrug your shoulders and use the cast.
-
- Tim
-
-
-